<input
	name="<?php echo $params['name'] ?>"
	value="<?php echo !empty($value)?date('Y-m-d', $value):''; ?>"
	type="text" <?php echo $htmlOptions ?>>
<?php if (!empty($params['masterValue'])) { ?>
	(master value: <?php echo $params['masterValue'] ?>)
<?php } ?>

<?php if (!empty($params['errors'])) { ?>
<div class="errors">
	<ul>
		<?php foreach($params['errors'] as $error) { ?>
		<li><?php echo $error ?></li>
		<?php } ?>
	</ul>
</div>
<?php } ?>
